home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / cp2dekit / h / mix.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-29  |  1.3 KB  |  50 lines

  1. //***************************************************************************
  2. //
  3. // this file is (c) '94-'96 Niklas Beisert
  4. //
  5. // this file is part of the cubic player development kit.
  6. // you may only use/modify/spread this file under the terms stated
  7. // in the cubic player development kit accompanying documentation.
  8. //
  9. //***************************************************************************
  10.  
  11. #ifndef __MIX_H
  12. #define __MIX_H
  13.  
  14. struct mixchannel
  15. {
  16.   void *samp;
  17.   long length;
  18.   long loopstart;
  19.   long loopend;
  20.   long replen;
  21.   long step;
  22.   long pos;
  23.   unsigned short fpos;
  24.   unsigned short status;
  25.   union
  26.   {
  27.     void *voltabs[2];
  28.     short vols[2];
  29.   };
  30. };
  31.  
  32. int mixInit(void (*getchan)(int ch, mixchannel &chn, int rate), int);
  33. void mixClose();
  34. void mixSetChan(int chan);
  35. void mixSetAmplify(int amp);
  36. void mixGetRealVolume(int ch, int &l, int &r);
  37. void mixGetMasterSample(short *s, int len, int rate, int opt);
  38. int mixGetChanSample(int ch, short *s, int len, int rate);
  39. int mixAddChanSample(int ch, short *s, int len, int rate);
  40. void mixGetRealMasterVolume(int &l, int &r);
  41.  
  42. #define MIX_PLAYING 1
  43. #define MIX_MUTE 2
  44. #define MIX_LOOPED 4
  45. #define MIX_PINGPONGLOOP 8
  46. #define MIX_PLAY16BIT 16
  47. #define MIX_INTERPOLATE 32
  48.  
  49. #endif
  50.